//
// Created by guasen on 2023/4/15.
//
#include "iostream"
#include "vector"
#include "algorithm"
using namespace std;
void printVector(vector<int> &v){
    for(int i : v){
        cout << i <<' ';
    }
    cout << endl;
}
int main(){
    vector<int > v{2,1,3,4};
    sort(v.begin(),v.end());
    printVector(v);
    v.erase(v.begin()+1);
    v.emplace_back(-1);
    printVector(v);
    v.emplace_back(8);
    printVector(v);
    std::sort(v.begin(), v.end());
    printVector(v);
}